<? 
require_once("admin/classes/check_customer_session.php");
check_customer_session(); 
?>
<?php require_once('include/header.php'); ?>
<?
$customer_id = $_SESSION['ep_customer_id'];
$query_image = "SELECT customer.image_1 FROM customer where customer_id = $customer_id";
$image = mysql_query($query_image) or die(mysql_error());
$row_image = mysql_fetch_assoc($image);
$totalRows_image = mysql_num_rows($image); 
?>
<? if($_REQUEST['refresh']==1){
//header("location: profile.php?cid=".$_SESSION['ep_customer_id']);
header("location: upload_photo.php");
}
 ?>
      <div id="middle_container_for_innerpage">
      <div id="innerpage_top_image"><img src="images/images/innerpage_top_corner_820x5.jpg"  height="5" /></div> 
      <div id="middle_inner_container">
      <?php require_once('include/left_menu.php'); ?>
        
        <div id="inner_page_middle_data">
        	<div id="page_heading">Photo Upload</div>
            <div id="upload_photo_row">
            	
            	Upload your photo to receive a proposal as early as possible. The best photo you upload the best proposal you received! You can change your photograph any time!
            </div>
			<div id="padding_use_only" style="padding-left:100px; padding-bottom:15px;">
            <div id="upload_photo_form">
            	<form action="upload.php" method="post" enctype="multipart/form-data" name="upload_photo" class="form-text" id="upload_photo">
                	<div id="uploaded_photo">
        		<?if($row_image['image_1']){?><a href="profile.php?cid=<?php echo $cust_id; ?>">
              <a href="profile.php?cid=<?= $customer_id; ?>"><img src="uploaded/thumb/<?=$row_image['image_1']?>"  border="0" class="image_border"></a>
              <?}else{?>
            <a href="profile.php?cid=<?php echo $row['customer_id']; ?>"><?if($row['gender']="Male"){?><img src="images/images/default_eparinay_groom.jpg" width="90" height="90" border="0" class="image_border" ><?} else{?>
				<img src="images/images/default_eparinay_bride.jpg" width="90" height="90" border="0" class="image_border" ><?}?></a><?}?>

                    </div>
                    <div id="file_btn">
                    	<div id="browse_photo"><input name="image_1" type="file" class="form-text" id="image_1" style="width:230px; height:20px;"></div>
                    	<div id="submit_photo"><div id="button_border">
              <input name="submit" type="submit" class="button" id="submit" value="Upload Photo" />
                    </div></div>
					<div id="submit_photo"><a href="profile.php?cid=<?=$_SESSION['ep_customer_id'] ?>">Check Your Profile with updated Photo</a> </div>
                    </div>
					<div id="code"> </div>
              </form>
            </div>
        </div>
	</div>
        

       
       
      </div> 
      <div id="corner_container_bottom_for_innerpage"><img src="images/images/innerpage_bottom_corner_820x10.jpg"  height="10" /></div>
    </div> 
      <!-- middle_container ends -->
    
    
        
    
<?php require_once('include/footer.php'); ?>
